package com.iqiyi.pps.epg.core.model.program;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by karkarrotxu on 2016/12/23.
 */
@Entity
@Table(name = "program_advert")
@Cache(usage = CacheConcurrencyStrategy.NONE)
public class ProgramAdvert {
    private long id;
    private String uuid;
    private long fatherQipuId;
    private int advertType;
    private int duration;
    private int deltaTime;
    private Timestamp createTime = new Timestamp(System.currentTimeMillis());
    private Timestamp updateTime;

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @Column(name = "uuid")
    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    @Column(name = "father_qipu_id")
    public long getFatherQipuId() {
        return fatherQipuId;
    }

    public void setFatherQipuId(long fatherQipuId) {
        this.fatherQipuId = fatherQipuId;
    }

    @Column(name = "advert_type")
    public int getAdvertType() {
        return advertType;
    }

    public void setAdvertType(int advertType) {
        this.advertType = advertType;
    }

    @Column(name = "duration")
    public int getDuration() {
        return duration;
    }

    public void setDuration(int duration) {
        this.duration = duration;
    }

    @Column(name = "delta_time")
    public int getDeltaTime() {
        return deltaTime;
    }

    public void setDeltaTime(int deltaTime) {
        this.deltaTime = deltaTime;
    }

    @Column(name = "create_time", updatable = false)
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Column(name = "update_time", insertable = false, updatable = false)
    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }
}
